<?php
set_time_limit(0);
if (isset($_POST['op']) && isset($_POST['yi'])){
    include '../c/config.php';
    $openid=trim($_POST['op']);
    $phone=trim($_POST['phone']);
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
     
    $mysqli->query("INSERT INTO `dan` (`id`, `uid`, `phone`,`yi`,`createtime`) VALUES (NULL,'".$openid."','".$phone."', '".json_encode($_POST['yi'], JSON_UNESCAPED_UNICODE)."','".date("Y-m-d H:i:s")."')");
    
  
    $mysqli->close();

    echo json_encode(array('s'=>'y'));
}else{
    echo json_encode(array('s'=>'n'));
}

?>